package com.chaopei.constructor;

/**
 * @Author Corday 天涯
 * @Date 2022/3/4 14:38
 */
public class Animal {
    private String nick;
    private double weight;
    private String type;
    public Animal(){};
//    创建构造
    public Animal(String nick,double weight){
        this.nick = nick;
        this.weight = weight;
    }
//    再创建构造
    public  Animal(String nick,double weight,String type){
        this(nick ,weight);
        this.type = type;
    }
//    提供set/get方法

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
